package humanMirror.model.advisor;

import humanMirror.model.analyzer.Consultation;
import humanMirror.model.human.Human;

import java.util.ArrayList;
import java.util.List;

public class AdvancedAdvisor {
    private final List<OrganAdvisor> organAdvisors;
    private final List<Consultation> consultations;
    private HumanAdvisor humanAdvisor;
    private String humanConsultation;

    public AdvancedAdvisor(Human pokemon) {
        this.humanAdvisor = new HumanAdvisor(pokemon);
        this.organAdvisors = new ArrayList<OrganAdvisor>();
        this.consultations = new ArrayList<Consultation>();
    }

    public void performConsultation() throws CloneNotSupportedException {
        consultations.clear();
        for (OrganAdvisor organAdvisor : organAdvisors) {
            organAdvisor.viewOrgan();
            consultations.add(organAdvisor.getConsultation());
        }
        humanConsultation = humanAdvisor.showHumanHealth();
    }

    public List<Consultation> getConsultations() {
        return new ArrayList<Consultation>(consultations);
    }

    public void addAdvisors(OrganAdvisor organAdvisor) {
        organAdvisors.add(organAdvisor);
    }

    public String getHumanConsultation() {
        return humanConsultation;
    }
}
